Optimal. Leaf size=108 \[ \frac {(g \tan (e+f x))^{1+p}}{a f g (1+p)}-\frac {\cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {3+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2785, 2687, 32,
2697} \begin {gather*} \frac {(g \tan (e+f x))^{p+1}}{a f g (p+1)}-\frac {\sec (e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac {p+2}{2},\frac {p+3}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{a f g^2 (p+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2687
Rule 2697
Rule 2785
Rubi steps
\begin {align*} \int \frac {(g \tan (e+f x))^p}{a+a \sin (e+f x)} \, dx &=\frac {\int \sec ^2(e+f x) (g \tan (e+f x))^p \, dx}{a}-\frac {\int \sec (e+f x) (g \tan (e+f x))^{1+p} \, dx}{a g}\\ &=-\frac {\cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {3+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)}+\frac {\text {Subst}\left (\int (g x)^p \, dx,x,\tan (e+f x)\right )}{a f}\\ &=\frac {(g \tan (e+f x))^{1+p}}{a f g (1+p)}-\frac {\cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {2+p}{2},\frac {3+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (g \tan (e+f x))^{2+p}}{a f g^2 (2+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(232\) vs. \(2(108)=216\).
time = 1.74, size = 232, normalized size = 2.15 \begin {gather*} \frac {2 \left (\cos (e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right )\right )^p \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \tan \left (\frac {1}{2} (e+f x)\right ) \left (\left (6+5 p+p^2\right ) \, _2F_1\left (\frac {1+p}{2},2+p;\frac {3+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-(1+p) \tan \left (\frac {1}{2} (e+f x)\right ) \left (2 (3+p) \, _2F_1\left (\frac {2+p}{2},2+p;\frac {4+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-(2+p) \, _2F_1\left (2+p,\frac {3+p}{2};\frac {5+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )\right ) (g \tan (e+f x))^p}{f (1+p) (2+p) (3+p) (a+a \sin (e+f x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.30, size = 0, normalized size = 0.00 \[\int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{a +a \sin \left (f x +e \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{\sin {\left (e + f x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{a+a\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________